/*
 * @Author: wwssaabb
 * @Date: 2021-08-16 17:02:41
 * @LastEditTime: 2021-08-16 17:02:41
 * @FilePath: \ts_demo\demo\extract.ts
 */

/* 
  extract，用来提取两个集合的交集
*/

interface A{
  name:string,
  age:number,
  sex:string,
  address:string
}

interface B{
  name:string,
  age:number,
}

type Eg1=Extract<keyof A,keyof B> //type类型为name|age
